using System;
using System.Collections;

namespace Com.CMS263.PO
{
	#region FileDiretory

	/// <summary>
	/// FileDiretory object for NHibernate mapped table 'FileDiretory'.
	/// </summary>
	public class FileDiretory
	{
		#region Member Variables
		
		protected int _id;
		protected int _userId;
		protected string _title;
		protected string _contents;
		protected DateTime _addDate;
		protected int _sendUser;
		protected string _filesLength;

		#endregion

		#region Constructors

		public FileDiretory() { }

		public FileDiretory( int userId, string title, string contents, DateTime addDate, int sendUser, string filesLength )
		{
			this._userId = userId;
			this._title = title;
			this._contents = contents;
			this._addDate = addDate;
			this._sendUser = sendUser;
			this._filesLength = filesLength;
		}

		#endregion

		#region Public Properties

		public virtual int Id
		{
			get {return _id;}
			set {_id = value;}
		}

		public  virtual int UserId
		{
			get { return _userId; }
			set { _userId = value; }
		}

		public  virtual string Title
		{
			get { return _title; }
			set
			{
				if ( value != null && value.Length > 500)
					throw new ArgumentOutOfRangeException("Invalid value for Title", value, value.ToString());
				_title = value;
			}
		}

		public  virtual string Contents
		{
			get { return _contents; }
			set
			{
				if ( value != null && value.Length > 4000)
					throw new ArgumentOutOfRangeException("Invalid value for Contents", value, value.ToString());
				_contents = value;
			}
		}

		public  virtual DateTime AddDate
		{
			get { return _addDate; }
			set { _addDate = value; }
		}

		public  virtual int SendUser
		{
			get { return _sendUser; }
			set { _sendUser = value; }
		}

		public  virtual string FilesLength
		{
			get { return _filesLength; }
			set
			{
				if ( value != null && value.Length > 50)
					throw new ArgumentOutOfRangeException("Invalid value for FilesLength", value, value.ToString());
				_filesLength = value;
			}
		}

		

		#endregion
	}
	#endregion
}